package cn.edu.qut.edusys.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

@Mapper
public interface teacherMapper {
    @Insert("insert into t_exam_paper_info" +
            "(question,rightAnswer,type,releasorId)" +
            " values(#{a},#{b},#{c},#{d})")
    int save(String a,String b,String c,String d);
    //将内容保存


    int update1(String a,String b);

    @Update("update t_exam_info" +
            " set score=#{score}" +
            " where studentId=#{studentId}")
    int change(Map<String,String> param);


    int change2(Map<String,String> param);
    List<Map<String,Object>> search(Map<String,String> param);//从题中选作业
    List<Map<String,Object>> search2(Map<String,String> param);//判作业
    List<Map<String,Object>> search3(Map<String,String> param);//判作业
    @Select("SELECT * FROM t_user_info WHERE userPhone=#{param}")
    List<Map<String,Object>> search4(String param);//根据iphone查找id
}
